a = 1

while a <= 9:
    b = 1
    while b <= a:
        print(f"{b}*{a} = {a*b} \t", end='')
        b += 1
    a += 1
    print()
# for循环的99乘法表

for a in range(1, 10):
    for b in range(1, a+1):
        print(f"{b} * {a} = {a * b}\t", end='')
    print()

name_list = ['1', '2', 666, True, 3.114, [12345, '秦宇翔']]
print(name_list)
print(type(name_list))
name = ['Rose', 'Tom', 'Lily']
print(name[0])
print(name[1])
print(name[2])
print(name[-1])
print(name[-2])
print(name[-3])
print(name_list[5][0])
print(name_list[5][1])
num = name.index('Tom')
print(num)
print(name)
name.insert(2, '666')
print(name)
name.append("你在狗叫什么？")
print(name)
name.extend(name_list)
print(name)
name_list = ['1', '2', 666, True, 3.114, [12345, '秦宇翔']]
del name_list[5]
print(name_list)
name_list = ['1', '2', 666, True, 3.114, '1', [12345, '秦宇翔']]
name_list.pop(5)
print(name_list)
name_list.remove('1')
print(name_list)
name_list.clear()
print(name_list)
luck = [1, 2, 3, 3, 3, 3, 3, 4, 5]
print(luck.count(3))
c = len(luck)
print(f"luck中的元素个数是{c}")
abc = [21, 25, 21, 3, 22, 20]
abc.append(31)
print(abc)
ab = [29, 33, 30]
abc.extend(ab)
print(abc)
print(abc[0])
print(abc[-1])
index1 = abc.index(31)
print(index1)
mn = ['你好', '我好', '他好', '大家好']
index = 0
while index < len(mn):
    index1 = mn[index]
    print(index1)
    index += 1
for x in mn:
    print(f"列表中的元素有：{x}")


# while 和 for 循环案例























